package com.work.yshop.model;

import java.io.Serializable;

/**
 * 商品浏览足迹模型类
 */
public class ProductHistory implements Serializable {
    private int id;
    private int productId;
    private int userId;
    private long viewTime;
    private Product product; // 关联的商品对象

    public ProductHistory() {
    }

    public ProductHistory(int productId, int userId, long viewTime) {
        this.productId = productId;
        this.userId = userId;
        this.viewTime = viewTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public long getViewTime() {
        return viewTime;
    }

    public void setViewTime(long viewTime) {
        this.viewTime = viewTime;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }
} 